OfflineManager

class OfflineManager : OfflineManagerInterface

An `offline manager` manages downloads and storage for style packages and also produces tileset descriptors for the `tile store`. All the asynchronous methods calls complete even if the `offline manager` instance gets out of scope before.

Constructors

OfflineManager
Link copied to clipboard
open fun OfflineManager(@NonNull() resourceOptions: ResourceOptions)
Construct a new `offline manager`.

Functions

createTilesetDescriptor
Link copied to clipboard
open fun createTilesetDescriptor(@NonNull() tilesetDescriptorOptions: TilesetDescriptorOptions): TilesetDescriptor
Construct a new `tileset descriptor` for the `tile store`.Tileset descriptors are used by the `tile store` to create new offline regions.Resolving the created tileset descriptor includes loading and parsing the style and might includecreation or update of a style package - depending on the given options.
getAllStylePacks
Link copied to clipboard
open fun getAllStylePacks(@NonNull() callback: StylePacksCallback)
Returns a list of the existing style packages.Note: The user-provided callbacks will be executed on a worker thread;it is the responsibility of the user to dispatch to a user-controlled thread.
getStylePack
Link copied to clipboard
open fun getStylePack(@NonNull() styleURI: String, @NonNull() callback: StylePackCallback)
Returns a style package by its id.Note: The user-provided callbacks will be executed on a worker thread;it is the responsibility of the user to dispatch to a user-controlled thread.
getStylePackMetadata
Link copied to clipboard
open fun getStylePackMetadata(@NonNull() styleURI: String, @NonNull() callback: StylePackMetadataCallback)
Returns a style package's associated metadataThe style package's associated metadata that a user previously set.
loadStylePack
Link copied to clipboard
open fun loadStylePack(@NonNull() styleURI: String, @NonNull() loadOptions: StylePackLoadOptions, @NonNull() onFinished: StylePackCallback): Cancelable
An overloaded version that does not report progess of the loading operation.
open fun loadStylePack(@NonNull() styleURI: String, @NonNull() loadOptions: StylePackLoadOptions, @NonNull() onProgress: StylePackLoadProgressCallback, @NonNull() onFinished: StylePackCallback): Cancelable
Loads a new style package or updates the existing one.If a style package with the given id already exists, it gets updated withthe values provided to the given load options.
removeStylePack
Link copied to clipboard
open fun removeStylePack(@NonNull() styleURI: String)
Removes a style package.Removes a style package from the existing packages list.